package com.hz.controller;

import com.hz.pojo.Typeofclothing;
import com.hz.service.impl.TypeofclothingServiceImpl;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
@RequestMapping("/typeofclothing")
@RestController
public class TypeofclothingController {
    @Resource
    TypeofclothingServiceImpl typeofclothingService;
    @RequestMapping("/getAllTypeofclothing")
    public List<Typeofclothing> getAllTypeofclothing (){

        try {
            return typeofclothingService.getAllTypeofclothing();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
    @RequestMapping("/getTypeofclothing")
    public Typeofclothing getTypeofclothing(Long dry_id){

        try {
            return typeofclothingService.getTypeofclothing(dry_id);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
